/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package WSController;

import WSModel.Instances_Builder;
import WSModel.WSClassifier;
import com.sun.mail.util.DecodingException;
import java.io.File;
import java.io.PrintStream;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;
import weka.core.Instance;
import weka.core.Instances;

/**
 *
 * @author acer
 */
@WebService()
public class WekaWS {

    /**
     * Web service operation
     */
    @WebMethod(operationName = "processInput")
    public String processInput(@WebParam(name = "inputString")
    char[] inputfile) {
        
        Instances_Builder instance = new Instances_Builder(inputfile.toString());
        Instances testiin = new Instances(instance.getIn());
//        testiin.setClassIndex(testiin.numAttributes()-1);
//        WSClassifier classify = new WSClassifier(testiin, "IBk", null);
        return instance.getIn().toSummaryString();
    }


    

}
